package com.lyd.generic.demo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Author:lyd
 **/
@AllArgsConstructor
@NoArgsConstructor
@Getter
public class Cat extends Animal {
    private int age;

    public Cat(String name, int age) {
        super(name);
        this.age = age;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "age=" + age +
                ",name="+ super.getName()+
                "} " ;
    }
}
